package org.lele.dto;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.sun.xml.internal.ws.api.message.Attachment;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.lele.excel.ExcelNotation;
import org.lele.excel.ExcelRequired;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

/**
 * @Author: fanYuLe
 * @CreateTime: 2024-09-24  14:07
 * @Description: 资产导入模板
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@ContentRowHeight(30)
@HeadRowHeight(30)
@ColumnWidth(30)
@ExcelIgnoreUnannotated
public class AssetsImportTemplateDto {

    @ApiModelProperty(value = "资产编号")
    private String assetNumber;

    @ExcelProperty(value = "序号",index = 0)
    @ApiModelProperty(value = "序号说明作用")
    private String remark;

    @ExcelRequired
    @ExcelNotation("hsja:\n" +
            "长度限制50字\n")
    @ExcelProperty(value = "*资产名称",index = 1)
    @ApiModelProperty(value = "资产名称")
    private String assetName;

    @ExcelRequired
    @ExcelProperty(value = "*资产类别",index = 2)
    @ApiModelProperty(value = "资产类别")
    private String assetCategory;

    //报错时回显中文使用
    private String assetCategoryCache;

    @ExcelProperty(value = "权属",index = 3)
    @ApiModelProperty(value = "资产二级类别")
    private String assetSubCategory;
    //报错时回显中文使用
    private String assetSubCategoryCache;

    @ExcelProperty(value = "资产性质",index = 4)
    @ApiModelProperty(value = "资产性质")
    private String assetProperty;
    //报错时回显中文使用
    private String assetPropertyCache;

    @ExcelRequired
    @ExcelNotation("hsja:\n" +
            "请填写数字\n")
    @ExcelProperty(value = "*建筑面积",index = 5)
    @ApiModelProperty(value = "建筑面积")
    //private BigDecimal buildingArea;
    private String buildingArea;

    @ExcelNotation("hsja:\n" +
            "请填写数字\n")
    @ExcelProperty(value = "套内面积",index = 6)
    @ApiModelProperty(value = "套内面积")
    //private BigDecimal insideSpaceArea;
    private String insideSpaceArea;

    @ExcelProperty(value = "资产用途",index = 7)
    @ApiModelProperty(value = "资产用途(多选)")
    private String assetUsage;
    //报错时回显中文使用
    private String assetUsageCache;

    @ExcelNotation("hsja:\n" +
            "长度限制50字\n")
    @ExcelProperty(value = "户型",index = 8)
    @ApiModelProperty(value = "户型")
    private String layout;

    @ExcelNotation("hsja:\n" +
            "长度限制10字\n")
    @ExcelProperty(value = "楼层",index = 9)
    @ApiModelProperty(value = "第几层")
    private String floor;

    @ExcelProperty(value = "朝向",index = 10)
    @ApiModelProperty(value = "朝向")
    private String orientation;
    //报错时回显中文使用
    private String orientationCache;

    @ExcelNotation("hsja:\n" +
            "长度限制50字\n")
    @ExcelProperty(value = "装修情况",index = 11)
    @ApiModelProperty(value = "装修情况")
    private String decorationCondition;

    @ExcelNotation("hsja:\n" +
            "长度限制20字\n")
    @ExcelProperty(value = "梯户比例",index = 12)
    @ApiModelProperty(value = "梯户比例")
    private String ladderRoomRatio;

    @ExcelNotation("hsja:\n" +
            "长度限制200字\n")
    @ExcelProperty(value = "适营业态",index = 13)
    @ApiModelProperty(value = "适营业态")
    private String suitBusiness;

    @ExcelRequired
    @ExcelProperty(value = "*房源介绍",index = 14)
    @ApiModelProperty(value = "房源介绍")
    private String assetIntroduction;

    //@ExcelProperty(value = "资产地址-省",index = 14)
    @ApiModelProperty(value = "省")
    @NotBlank(message = "省份不能为空")
    private String province;

    //@ExcelProperty(value = "资产地址-市",index = 15)
    @ApiModelProperty(value = "市")
    @NotBlank(message = "市区不能为空")
    private String municipality;

    //@ExcelProperty(value = "资产地址-区",index = 16)
    @ApiModelProperty(value = "辖区")
    @NotBlank(message = "辖区不能为空")
    private String district;

   // @ExcelProperty(value = "资产地址-街道",index = 17)
    @ApiModelProperty(value = "街道")
    @NotBlank(message = "街道不能为空")
    private String street;

    @ExcelRequired
    @ExcelProperty(value = "*资产地址",index = 15)
    @ApiModelProperty(value = "资产地址")
    private String assetAddress;

   // @ExcelProperty(value = "*地图选址经度",index = 15)
    @ApiModelProperty(value = "经度")
    @NotNull(message = "经度不能为空")
   // private Double longitude;
    private String longitude;

    //@ExcelProperty(value = "*地图选址纬度",index = 16)
    @ApiModelProperty(value = "纬度")
    @NotNull(message = "纬度不能为空")
   // private Double latitude;
    private String latitude;

    @ExcelNotation("hsja:\n" +
            "长度限制50字\n" +
            "\n")
    @ExcelProperty(value = "资产详址",index = 16)
    @ApiModelProperty(value = "资产详址")
    private String assetDetailAddress;

    @ExcelNotation("hsja:\n" +
            "长度限制50字\n")
    @ExcelProperty(value = "产权单位",index = 17)
    @ApiModelProperty(value = "产权单位")
    private String propertyUnit;

    @ExcelNotation("hsja:\n" +
            "请填写数字\n")
    @ExcelProperty(value = "产权面积",index = 18)
    @ApiModelProperty(value = "产权面积")
    //private BigDecimal propertyArea;
    private String propertyArea;

    @ExcelProperty(value = "产权是否自有",index = 19)
    @ApiModelProperty(value = "产权是否自有")
    private String selfOwnedProperty;
    //报错时回显中文使用
    private String selfOwnedPropertyCache;

    @ExcelProperty(value = "产权证编号",index = 20)
    @ApiModelProperty(value = "产权证编号")
    private String propertyCertificateNo;

    @ExcelRequired
    @ExcelNotation("hsja:\n" +
            "请填写数字\n")
    @ExcelProperty(value = "租金（元/年起）",index = 21)
    @ApiModelProperty(value = "租金（元/年）")
    //private BigDecimal rentPerYear;
    private String rentPerYear;

    /*@ExcelProperty(value = "参考租金",index = 25)
    @ApiModelProperty(value = "参考租金")
    //private BigDecimal referenceRent;
    private String referenceRent;*/

    @ExcelNotation("hsja:\n" +
            "请填写数字\n")
    @ExcelProperty(value = "租赁保证金（元）",index = 22)
    @ApiModelProperty(value = "租赁保证金（元）")
    //private BigDecimal leaseDeposit;
    private String leaseDeposit;

    @ExcelRequired
    @ExcelNotation("hsja:\n" +
            "请填写整数\n")
    @ExcelProperty(value = "*租期（月）",index = 23)
    @ApiModelProperty(value = "租期（月）")
    //private Long leaseTermMonths;
    private String leaseTermMonths;

    @ExcelNotation("hsja:\n" +
            "长度限制50字\n")
    @ExcelProperty(value = "优先承租权",index = 24)
    @ApiModelProperty(value = "优先承租权")
    private String preemptiveRight;

    @ExcelProperty(value = "租金支付条件",index = 25)
    @ApiModelProperty(value = "租金支付要求")
    private String rentPayRequire;

    @ExcelProperty(value = "与交易相关的其他条件",index = 26)
    @ApiModelProperty(value = "与交易相关的其他条件")
    private String otherTransactionConditions;

    @ExcelProperty(value = "出租用途",index = 27)
    @ApiModelProperty(value = "出租用途")
    private String rentalPurpose;

    @ExcelRequired
    @ExcelProperty(value = "*联系电话",index = 28)
    @ApiModelProperty(value = "联系人手机号码")
    private String contactPersonPhone;

    @ExcelProperty(value = "联系人电子邮箱",index = 29)
    @ApiModelProperty(value = "联系人电子邮箱")
    private String contactPersonEmail;

    @ExcelRequired
    @ExcelProperty(value = "*是否委托运营",index = 30)
    @ApiModelProperty(value = "是否委托运营")
    private String isEntrustOperate;
    //报错时回显中文使用
    private String isEntrustOperateCache;

    @ExcelProperty(value = "运营企业名称",index = 31)
    @ApiModelProperty(value = "运营企业名称集合")
    private String operateCompanyInfos;





//以下字段  不在导出模板里面




    @ApiModelProperty(value = "资产租赁状态")
    private String assetLeaseStatus;



    @ApiModelProperty(value = "有无免租期")
    private String rentFreePeriod;


    //@ExcelProperty(value = "企业名称",index = 28)
    @ApiModelProperty(value = "企业名称")
    private String enterpriseName;

    //@ExcelProperty(value = "统一社会信用代码",index = 29)
    @ApiModelProperty(value = "统一社会信用代码")
    private String socialCreditCode;

    //@ExcelProperty(value = "联系人",index = 30)
    @ApiModelProperty(value = "联系人")
    private String contactPerson;



    @ApiModelProperty(value = "资产照片（逗号分隔）")
    private String assetPhoto;

    @ApiModelProperty(value = "标签Ids（逗号分隔）")
    private String labelIds;

    @ApiModelProperty(value = "专题id")
    private Long specialTopicId;

    @ApiModelProperty(value = "专题名称")
    private String specialTopicName;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createDateTime;

    @ApiModelProperty(value = "修改时间")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime updateDateTime;

    @ApiModelProperty(value = "创建人ID",hidden = true)
    @JsonIgnore
    private Long createUserId;

    @ApiModelProperty(value = "创建人名称",hidden = true)
    @JsonIgnore
    private String createUserName;

    @ApiModelProperty(value = "是否删除(0:未删除,1:已删除)",hidden = true)
    @JsonIgnore
    private Integer isDelete;

    @ApiModelProperty(value = "组关联织id")
    private Long orgId;

    @ApiModelProperty(value = "附件列表")
    private List<Attachment> attachmentList = new ArrayList<>();

    @ApiModelProperty(value = "置顶时间",hidden = true)
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JsonIgnore
    private LocalDateTime topTime;

    @ApiModelProperty(value = "浏览量")
    private Long viewCount;

    @ApiModelProperty(value = "是否收藏")
    private Boolean isCollect;



    @ApiModelProperty(value = "运营企业ids")
    private String operateCompanyIds;



    @ApiModelProperty(value = "联系人id")
    @NotNull(message = "联系人id不能为空")
    private Long contactPersonId;

    @ApiModelProperty(value = "资产户型照片（逗号分隔）")
    private String assetLayoutPhoto;


    @ApiModelProperty(value = "小程序分享时显示图片的url")
    private String wxShareImg;

    @ApiModelProperty(value = "vr看房url")
    private String vrUrl;

    @ApiModelProperty(value = "vrJson")
    private String vrJson;



    @ApiModelProperty(value = "户型 第一个参数 n室n厅n卫")
    private Integer layoutFirst;

    @ApiModelProperty(value = "户型 第二个参数 n室n厅n卫")
    private Integer layoutSecond;

    @ApiModelProperty(value = "户型 第三个参数 n室n厅n卫")
    private Integer layoutThird;


    @ApiModelProperty(value = "共几层")
    private Integer totalFloor;







    //审核功能新增字段
    @ApiModelProperty(value = "发布审核状态")
    private String publishAuditStatus;

    @ApiModelProperty("录入来源类型 0平台录入 默认为0，1 第三方录入")
    private Integer inputSource;

    @ApiModelProperty("资产录入时的操作选项 保存或发布")
    @NotBlank
    private String inputOperateOption;

    @ApiModelProperty(value = "审核最新节点名称")
    private String latestNodeName;






    @ApiModelProperty(value = "videoImg")
    private String videoImg;

    @ApiModelProperty("vrImg")
    private String vrImg;
}
